home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / word < prev    next >
Text File  |  2001-03-21  |  1KB  |  32 lines

  1. Synopsis:
  2.    $word(<index> <list>)
  3.    $notw(<index> <list>)
  4.  
  5. Technical:
  6.    The $word() function returns the single word in the given list that has
  7.    the given index in the list, counting from 0 (zero).  Its counterpart,
  8.    $notw(), does exactly the opposite, returning the entire string, minus
  9.    the indexed word (again counting from 0).
  10.  
  11. Practical:
  12.    These functions are useful when you need to get (or hide) whatever word
  13.    is in a particular position in a string of words.  It's mostly useful
  14.    when you know that you always (or never) want the Xth word in the list,
  15.    regardless of what it is.
  16.  
  17. Returns:
  18.    word: indexed word
  19.    notw: string without indexed word
  20.  
  21. Examples:
  22.    $word(2 foo bar blah)                  returns "blah"
  23.    $word(4 foo bar blah)                  returns nothing
  24.    $word(-1 foo bar blah)                 returns nothing
  25.    $notw(2 foo bar blah)                  returns "foo bar"
  26.    $notw(4 foo bar blah)                  returns "foo bar blah"
  27.    $notw(-1 foo bar blah)                 returns "foo bar blah"
  28.  
  29. See Also:
  30.    leftw(6); restw(6); rightw(6)
  31.  
  32.